﻿using BCCommon.Extensions;
using BCCommon.TMS.Order;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BCDto.TMS.Order.OrderPool
{
    /// <summary>
    /// 订单池
    /// </summary>
    public class OrderPoolDto : OrderDto
    {
        /// <summary>
        /// 订单指派超时重回订单池时间
        /// </summary>
        public DateTime AssignTimeOut { get; set; }
        /// <summary>
        /// 指派状态
        /// </summary>
        public OrderAssignHandleStatus AssignStatus { get; set; }
        /// <summary>
        /// 指派状态描述
        /// </summary>
        public string AssignStatusStr { get { return AssignStatus.GetDescriptionString(); } }
        /// <summary>
        /// 指派类型
        /// </summary>
        public OrderAssignType AssignType { get; set; }
        /// <summary>
        /// 是否指派已就绪
        /// </summary>
        public bool IsAssignReady { get; set; }
        /// <summary>
        /// 编辑人
        /// </summary>
        public string Editer { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime UpdateTime { get; set; }
        /// <summary>
        /// 是否已超时
        /// </summary>
        public bool IsTimeOut { get; set; }
        /// <summary>
        /// 超时级别
        /// </summary>
        public int TimeOutLevel { get; set; }
        /// <summary>
        /// 完成或取消时间
        /// </summary>
        public DateTime EndTime { get; set; }
        /// <summary>
        /// 与装货地距离 单位是米
        /// </summary>
        public decimal? Distance { get; set; }
        /// <summary>
        /// 订单指派记录是否存在
        /// </summary>
        public bool AssignRecordExists { get; set; }
        /// <summary>
        /// 部门Id
        /// </summary>
        public int DepartmentId { get; set; }
        /// <summary>
        /// 部门名称
        /// </summary>
        public string DepartmentName { get; set; }
        /// <summary>
        /// 围栏Id
        /// </summary>
        public new long? FenceId { get; set; }
        /// <summary>
        /// 代理商Id
        /// </summary>
        public new long AgentRecordId { get; set; }
    }
}
